<template>
  <StorageConfig v-bind="stats"/>
</template>
<script lang="ts" setup>
import {ref} from 'vue';
import {useDesign} from '/@/hooks/web/useDesign';
import {useGlobSetting} from '/@/hooks/setting';
import {ConfigKey} from '/@/views/system/config/config.model';
import StorageConfig from './StorageConfig.vue'
import {FormSchema} from '/@/components/Table';
import {rules} from '/@/utils/helper/validator';

// 阿里云
const formSchema : FormSchema[] = [
  {
    field: 'bucket',
    label: '存储空间',
    helpMessage: '存储空间与阿里云OSS开通对象名称一致',
    required: true,
    component: 'Input'
  },
  {
    field: 'accessKey',
    label: 'accessKeyID',
    required: true,
    component: 'Input',
  },
  {
    field: 'secretKey',
    helpMessage: 'accessKeySecret',
    label: 'secret',
    required: true,
    component: 'Input',
  },
  {
    field: 'endpoint',
    label: 'endpoint',
    helpMessage: 'Bucket地域endpoint',
    rules: rules.rule('http', true),
    required: true,
    component: 'Input',
  },
  
];

const stats = ref({ configKey: ConfigKey.STORAGE_ALIYUN, formSchema })

const { prefixCls } = useDesign('config-center');

const glob = useGlobSetting();

</script>

<style lang="less">
@import '../../style.less';
</style>
